/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package scacp;

/**
 *
 * @author cleber
 */
public class QuestaoMEFormulario extends QuestaoFormulario {

    /**
     * Creates new form QuestaoMEFormulario
     */
    public QuestaoMEFormulario(int numeroQuestao, int numeroInscricao) {
        super(numeroQuestao, numeroInscricao);
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        lblNumeroQuestao = new javax.swing.JLabel();
        rbtA = new javax.swing.JRadioButton();
        rbtB = new javax.swing.JRadioButton();
        rbtC = new javax.swing.JRadioButton();
        rbtD = new javax.swing.JRadioButton();
        rbtE = new javax.swing.JRadioButton();
        rbtMultipla = new javax.swing.JRadioButton();
        rbtBranco = new javax.swing.JRadioButton();

        lblNumeroQuestao.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblNumeroQuestao.setText(String.format("%2d", numeroQuestao));

        rbtA.setText("a");
        rbtgAlternativas.add(rbtA);
        alternativas.add(rbtA);
        rbtA.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtAActionPerformed(evt);
            }
        });

        rbtB.setText("b");
        rbtgAlternativas.add(rbtB);
        alternativas.add(rbtB);
        rbtB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtBActionPerformed(evt);
            }
        });

        rbtC.setText("c");
        rbtgAlternativas.add(rbtC);
        alternativas.add(rbtC);
        rbtC.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtCActionPerformed(evt);
            }
        });

        rbtD.setText("d");
        rbtgAlternativas.add(rbtD);
        alternativas.add(rbtD);
        rbtD.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtDActionPerformed(evt);
            }
        });

        rbtE.setText("e");
        rbtgAlternativas.add(rbtE);
        alternativas.add(rbtE);
        rbtE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtEActionPerformed(evt);
            }
        });

        rbtMultipla.setText("#");
        rbtgAlternativas.add(rbtMultipla);
        alternativas.add(rbtMultipla);
        rbtMultipla.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtMultiplaActionPerformed(evt);
            }
        });

        rbtBranco.setText("*");
        if(numeroInscricao == 9999990){
            rbtBranco.setVisible(false);
        }

        rbtgAlternativas.add(rbtBranco);
        alternativas.add(rbtBranco);
        rbtBranco.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtBrancoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(rbtB)
            .addComponent(rbtC)
            .addComponent(rbtD)
            .addComponent(rbtE)
            .addComponent(rbtMultipla)
            .addComponent(rbtBranco)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                .addComponent(lblNumeroQuestao, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addComponent(rbtA, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(lblNumeroQuestao)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtA)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtB)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtC)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtD)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtMultipla)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtBranco)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void rbtAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtAActionPerformed
        alternativa = "a";
    }//GEN-LAST:event_rbtAActionPerformed

    private void rbtBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtBActionPerformed
        alternativa = "b";
    }//GEN-LAST:event_rbtBActionPerformed

    private void rbtCActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtCActionPerformed
        alternativa = "c";
    }//GEN-LAST:event_rbtCActionPerformed

    private void rbtDActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtDActionPerformed
        alternativa = "d";
    }//GEN-LAST:event_rbtDActionPerformed

    private void rbtEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtEActionPerformed
        alternativa = "e";
    }//GEN-LAST:event_rbtEActionPerformed

    private void rbtMultiplaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtMultiplaActionPerformed
        alternativa = "#";
    }//GEN-LAST:event_rbtMultiplaActionPerformed

    private void rbtBrancoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtBrancoActionPerformed
        alternativa = "*";
    }//GEN-LAST:event_rbtBrancoActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel lblNumeroQuestao;
    private javax.swing.JRadioButton rbtA;
    private javax.swing.JRadioButton rbtB;
    private javax.swing.JRadioButton rbtBranco;
    private javax.swing.JRadioButton rbtC;
    private javax.swing.JRadioButton rbtD;
    private javax.swing.JRadioButton rbtE;
    private javax.swing.JRadioButton rbtMultipla;
    // End of variables declaration//GEN-END:variables

}
